package com.ihome.android.academy;


import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;

import com.ihome.android.EAActivity;
import com.ihome.android.academy.R;
import com.ihome.android.market2.frag.CategoryAppFragment;

public class CategoryAppActivity extends EAActivity {
	private String					TAG					= CategoryAppActivity.class.getSimpleName();

	private Context					mContext;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.category_app);
		/**
		 * activity可以通过从FragmentManager获得一个到Fragment的引用来调用fragment中的方法， 使用
		 * findFragmentById() 或 findFragmentByTag()
		 */
		//CategoryAppFragment mCategoryAppFragment = (CategoryAppFragment) getSupportFragmentManager().findFragmentById(R.id.frag_caretory_app);
		
		CategoryAppFragment mCategoryAppFragment = new CategoryAppFragment();
		mCategoryAppFragment.setArguments(getIntent().getExtras());
		
		FragmentTransaction transaction1 = getSupportFragmentManager().beginTransaction();
		transaction1.add(R.id.rl_content, mCategoryAppFragment);
		transaction1.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
		transaction1.setTransitionStyle(R.style.Animations_PopDownMenu);
		transaction1.commit();
		
	}

	@Override
	protected void onResume() {
		super.onResume();
	}


}
